import storage from '../storage'

// eslint-disable-next-line no-unused-vars
const User = {
  state: {
    token: ''
  },
  mutations: {
    // 设置token
    set_token (state, token) {
      state.token = token
      storage.set('token', token)
    },
    // 清除token
    del_token (state) {
      state.token = ''
      storage.remove('token')
    }
  }
}
